package com.ls.pattern.behavior.chain_responsibility;

public class Main {
    public static void main(String[] args) {
        PurchaseRequest request = new PurchaseRequest(1, 200000, 1);

        DepartmentApprover departmentApprover = new DepartmentApprover("张主任");
        CollegeApprover collegeApprover = new CollegeApprover("王院长");
        ViceSchoolMasterApprover viceSchoolMasterApprover = new ViceSchoolMasterApprover("刘副校");
        SchoolMasterApprover schoolMasterApprover = new SchoolMasterApprover("李校长");
        departmentApprover.setNextApprover(collegeApprover);
        collegeApprover.setNextApprover(viceSchoolMasterApprover);
        viceSchoolMasterApprover.setNextApprover(schoolMasterApprover);

        departmentApprover.processRequest(request);



    }
}
